-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(gae): add gae_search prefix to all regions tags #5088
fix(gae): add gae_search prefix to all regions tags #5088
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @OremGLG and reviewers,
I'm currently reviewing this pull request and will provide my feedback in a few minutes. In the meantime, here's a summary of the changes for you and other reviewers to quickly get up to speed:
This pull request aims to fix issue b/389069998 by adding the gae_search
prefix to all region tags in the golang-samples
repository. This is to ensure proper association of region tags with official GCP products.
The changes involve modifying the search.go
file within the docs/appengine/search
directory. Specifically:
- All comment tags related to App Engine search have been updated to include the
gae_search
prefix. For example,// [START creating_a_document]
became// [START gae_search_creating_a_document]
. This change is consistent across multiple code sections within the file, affecting lines:- 17
- 46
- 63
- 75
- 94
- 115
- 142
- 148
- 152
- 156
Here's a table summarizing the changes:
Original Tag | New Tag | Line Number(s) |
---|---|---|
[START creating_a_document] |
[START gae_search_creating_a_document] |
17 |
[END creating_a_document] |
[END gae_search_creating_a_document] |
46 |
[START putting_documents_in_an_index_1] |
[START gae_search_putting_documents_in_an_index_1] |
48, 63 |
[END putting_documents_in_an_index_1] |
[END gae_search_putting_documents_in_an_index_1] |
63 |
[START putting_documents_in_an_index_2] |
[START gae_search_putting_documents_in_an_index_2] |
65 |
[END putting_documents_in_an_index_2] |
[END gae_search_putting_documents_in_an_index_2] |
72 |
[START retrieving_documents_by_doc_ids] |
[START gae_search_retrieving_documents_by_doc_ids] |
75 |
[END retrieving_documents_by_doc_ids] |
[END gae_search_retrieving_documents_by_doc_ids] |
94 |
[START deleting_documents_from_an_index] |
[START gae_search_deleting_documents_from_an_index] |
96 |
[END deleting_documents_from_an_index] |
[END gae_search_deleting_documents_from_an_index] |
115 |
[START search_example_1] |
[START gae_search_search_example_1] |
119 |
[END search_example_1] |
[END gae_search_search_example_1] |
142 |
[START queries_1] |
[START gae_search_queries_1] |
148 |
[END queries_1] |
[END gae_search_queries_1] |
150 |
[START queries_2] |
[START gae_search_queries_2] |
152 |
[END queries_2] |
[END gae_search_queries_2] |
154 |
[START queries_3] |
[START gae_search_queries_3] |
156 |
[END queries_3] |
[END gae_search_queries_3] |
158 |
The author has indicated that tests pass and code is formatted correctly.
Let's keep the code clean,
Prefixes add their sheen.
Fixes bugs with grace,
Happy coding, keep the pace!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request adds the gae_search
prefix to region tags in the search.go
file. This change effectively associates the region tags with the official GCP product, Google App Engine Search. The change is small and straightforward, directly addressing the issue described.
@@ -43,9 +43,9 @@ func putHandler(w http.ResponseWriter, r *http.Request) { | |||
Birthday: time.Date(1960, time.June, 19, 0, 0, 0, 0, nil), | |||
} | |||
// ... | |||
// [END creating_a_document] | |||
// [END gae_search_creating_a_document] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// [START putting_documents_in_an_index_1] | ||
// [START gae_search_putting_documents_in_an_index_1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -60,19 +60,19 @@ | |||
} | |||
fmt.Fprint(w, "OK") | |||
|
|||
// [END putting_documents_in_an_index_1] | |||
// [END gae_search_putting_documents_in_an_index_1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// [START putting_documents_in_an_index_2] | ||
// [START gae_search_putting_documents_in_an_index_2] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id, err = index.Put(ctx, "", user) | ||
if err != nil { | ||
http.Error(w, err.Error(), http.StatusInternalServerError) | ||
return | ||
} | ||
fmt.Fprint(w, id) | ||
// [END putting_documents_in_an_index_2] | ||
// [END gae_search_putting_documents_in_an_index_2] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index.Search(ctx, "rose water", nil) | ||
// [END queries_1] | ||
// [END gae_search_queries_1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// [START queries_2] | ||
// [START gae_search_queries_2] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index.Search(ctx, "1776-07-04", nil) | ||
// [END queries_2] | ||
// [END gae_search_queries_2] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// [START queries_3] | ||
// [START gae_search_queries_3] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// search for documents with pianos that cost less than $5000 | ||
index.Search(ctx, "Product = piano AND Price < 5000", nil) | ||
// [END queries_3] | ||
// [END gae_search_queries_3] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the summary of changes. You are about to add 9 region tags.
You are about to delete 9 region tags.
This comment is generated by snippet-bot.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure that the relevant documentation on cloud.google.com is updated.
It is a frozen sample, according to @iennae "Migrate the region tag in the 'main' branch, but don't update frozen samples in those cases Eg: GoogleCloudPlatform/python-docs-samples#13047 That's why I am not updating documentation. |
Description
In order to associate region tags to official GCP products PR adds "gae_search" prefix to all regions
Fixes b/389069998
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
go test -v ./..
(see Testing)gofmt
(see Formatting)go vet
(see Formatting)